Deriving Pretty-Big-Step Semantics from Small-Step Semantics
نویسندگان
چکیده
Big-step semantics for languages with abrupt termination and/or divergence suffer from a serious duplication problem, addressed by the novel ‘pretty-big-step’ style presented by Charguéraud at ESOP’13. Such rules are less concise than corresponding small-step rules, but they have the same advantages as big-step rules for program correctness proofs. Here, we show how to automatically derive pretty-big-step rules directly from small-step rules by ‘refocusing’. This gives the best of both worlds: we only need to write the relatively concise small-step specifications, but our reasoning can be big-step as well as small-step. The use of strictness annotations to derive small-step congruence rules gives further conciseness.
منابع مشابه
Pretty-Big-Step Semantics
In spite of the popularity of small-step semantics, big-step semantics remain used by many researchers. However, big-step semantics suffer from a serious duplication problem, which appears as soon as the semantics account for exceptions and/or divergence. In particular, many premises need to be copy-pasted across several evaluation rules. This duplication problem, which is particularly visible ...
متن کاملFrom Small-Step Semantics to Big-Step Semantics, Automatically
Small-step semantics and big-step semantics are two styles for operationally defining the meaning of programming languages. Small-step semantics are given as a relation between program configurations, relation which denotes one computational step; big-step semantics are given as a relation directly associating to each program configuration the corresponding final configuration. Small-step seman...
متن کاملTrace-Based Coinductive Operational Semantics for While Big-Step and Small-Step, Relational and Functional Styles
We present four coinductive operational semantics for the While language accounting for both terminating and non-terminating program runs: big-step and small-step relational semantics and big-step and small-step functional semantics. The semantics employ traces (possibly infinite sequences of states) to record the states that program runs go through. The relational semantics relate statement-st...
متن کاملCapsules and Closures: A Small-Step Approach
We present a side by side comparison of Capsules and Closures, including a proof of bisimilarity, using small-step semantics. A similar proof was presented in [8], using big-step semantics. However, while big-step semantics only allow to talk about final results of terminating computations, the use of small-step semantics allows to prove a stronger bisimilarity involving every step of the compu...
متن کاملRule-Based Operational Semantics for an Imperative Language
Operational semantics for programming languages usually come in two flavours: big-step and small-step. Both are defined using deduction rules with a congruence rule allowing reduction in certain contexts. For a description based on rewrite rules, known approaches consist in deriving an abstract machine, which is very close to implementation. In this paper, we describe the operational semantics ...
متن کامل